<template>
    <p>
        3. 整合vue-router
        <router-link to="/hello">To HelloWorld</router-link>
        &nbsp;<button @click="goBack">Back</button>
    </p>
</template>
<script>
import { useRouter } from 'vue-router'
export default {
    setup() {
        const router = useRouter()
        const goBack = () => {
            router.go(-1)
        }
        return {
            goBack
        }
    }
}
</script>

<style lang="scss" scoped>
</style>